import Vue from 'vue'
import 'iview/dist/styles/iview.css'

import {
    locale,
    Dropdown,
    DropdownMenu,
    DropdownItem,
    Drawer,
    Form,
    FormItem,
    Row,
    Col,
    Input,
    InputNumber,
    TimePicker,
    Icon,
    Tag,
    Switch,
    Notice,
    RadioGroup,
    Radio,
    Select,
    Option,
    Button,
    Slider
} from 'iview';



const components = {
    Dropdown,
    DropdownMenu,
    DropdownItem,
    Drawer,
    Form,
    FormItem,
    Row,
    Col,
    Input,
    InputNumber,
    TimePicker,
    Icon,
    Tag,
    Notice,
    RadioGroup,
    Radio,
    Select,
    Option,
    Button,
    Slider
};

const iviewModule = {
    ...components,
    iSwitch: Switch,
    iButton: Button
}


Object.keys(iviewModule).forEach(key => {
    Vue.component(key, iviewModule[key])
})

Vue.prototype.$Notice = Notice;
